1. Field of the Invention
The present invention relates to a vector quantization system made available for compression and transmission of data of digital signals such as a speech signal for example. More particularly, the invention relates to a speech coding system using a vector quantization process for quantizing a vector by splitting the vector into data related to gain and index.
2. Description of the Related Art
Today, the vector quantization system is one of the most important technologies attracting keen attention of those concerned, which is substantially a means for effectively encoding either a speech signal or an image signal by effectively compressing it. In particular, in the speech coding field, either the "code excited linear production (CELP)" system or the "vector excited coding (VXC)" system is known as the one to which the vector quantization system is applied. Further detail of the CELP system is described by M. R. Schroeder and B. S. Atal, in the technical papers cited below. "Code excited linear production (CELP)" AND "High-quality speech at very low bit rates", in Proc., ICASSP, 1985, on pages 937 through 939.
The conventional method of vector quantization is described below. The conventional vector quantization process is hereinafter sequentially described by applying a code vector or a vector n1=(u.sub.i (1), u.sub.i (2), . . . u.sub.i (L)) (i=1, 2, . . . Ns) generated from a code vector against a target vector u=(u(1), u(2), . . . u(L) composed of L pieces of sample and also by applying NG pieces of gain quantization values Gq (q=1,2 . . . , NG) stored in gain table TG.
Next, using index I and gain code Q of the finally selected code vector based on the above vector quantization, the quantized vector of the target vector u is expressed by equation (B1) shown below. EQU u=G.sub.Q.U.sub.I (B 1)
Next, based on a conventional vector quantization process, a method of selecting index I and gain code Q is described below.
FIG. 15 presents a schematic block diagram of a conventional vector quantization unit based on the the CELP system. Code book 50 is substantially a memory storing a plurality of code vectors. When the stored code vector C(i) is delivered to a filter 52, vector u(i) is generated. Using the vector u(i) generated by the filter 52 and the target vector u, the vector quantization unit 54 selects an optimal index I and gain code G so that error can be minimized.
An error E Between the target vector u and the prospective vector for making up the quantized vector is expressed by equation (B2) shown below. ##EQU1##
When solving the above equation (B2), it is suggested that the optimal values of i and q can be selected with minimum error by detecting a combination of these values i and q when the error E is minimum subsequent to the detection of error E from all the combinations of i and q. Nevertheless, since this method detects minimum error E, computation of the above equation (B2) and comparative computations must be executed by N.sub.S .times.N.sub.G rounds. Although depending on the values of N.sub.S and N.sub.G, normally, a huge amount of computations must be executed. To compensate for this, conventionally, the following method is made available. The above equation (B2) is rewritten into the following equation (B3). ##EQU2## where G1 designates an optical gain for minimizing the value of E.sub.i in the above equation (B3) against each index i. The value of G1 can be determined by assuming that both sides of the above equation (B3) are equal to zero by partially differentiating both sides with G.sub.i.
Concretely, the following equation (B4) can be solved by applying Gi so that still further equations (B5), (B6), and (B7) can be set up. Furthermore, by permuting the above equations (B6) and (B7), the equation (B5) can be developed into (B8). ##EQU3## By substituting the above equation (B8) into the preceding equation (B3), the following equation (B9) can be set up. ##EQU4##
As a result, when the optimal gain G.sub.i is available, the optimal index capable of minimizing the error Ei is substantially the index which minimizes [A.sub.i ].sup.2 /B.sub.i. Based on this principle, any conventional vector quantization system initially selects index I capable of minimizing the value [A.sub.i ].sup.2 /B.sub.i from all the prospective indexes, and then selects the quantized value of the optimal gain G.sub.i (which is to be computed based on the above equation (B8) for the established index I) from the gain quantizing values Gq (q=1, 2, . . . , N.sub.G) before eventually determining the gain code Q. This makes up a feature of the conventional vector quantization process.
This conventional system dispenses with the need of directly computing error E.sub.i, and yet, makes it possible to select the index I and the gain Q according to the number of computations which is dependent on the number of the prospective indexes dispensing with computation of all the combinations of i and q.
FIG. 16 presents a flowchart designating the procedure of the computation mentioned above. Step 31 shown in FIG. 16 computes power B.sub.i of vector u.sub.i generated from the prospective index i by applying the above equation (B7), and also computes an inner product A; of the vector u.sub.i and the target vector u by applying the above equation (B6).
Step 32 determines the index I maximizing the assessed value [A.sub.i ].sup.2 /B.sub.i by applying the power B.sub.i and the inner product A.sub.i, and then holds the selected index value.
Step 33 quantizes gain using the power B.sub.i and the inner product A.sub.i based on the quantization output index determined by the process shown in the preceding step 32.
To compare the indexes i and j in the course of the above step 32, it is known that the following equation (B10) can be used for executing comparative computations without applying division. EQU .DELTA..sub.fj =[A.sub.i ].sup.2 .multidot.B.sub.j -[A.sub.j ].sup.2 .multidot.B.sub.i (B 10)
In the above equation (B10), if .DELTA.ij were positive, then the index i is selected. Conversely, if .DELTA.ij were negative, then the index j is selected.
After completing comparison of the predetermined number of indexes, the ultimate index is selected, which is called the "quantization output index".
The conventional system related to the vector quantization described above can select indexes and gains by executing relatively lower number of computations. Nevertheless, any of these conventional systems has a particular problem in the performance of quantization. More particularly, since the conventional system assumes that no error is present in the quantized gain when selecting an index, in the event that there is substantial error in the quantized gain later on, the error E(i,q) of the above equation B2 expands beyond a negligible range. This is described below in detail.
While executing those processes shown in FIG. 16, it is assumed that the index I is established after completing executing of step 32. It is also assumed that quantization of an optimal gain G.sub.i of the index I is completed by executing computations as per the preceding equation (B8) in step 33, and then the quantized value G.sub.I is entered. The error .delta. of the quantized gain can be expressed by the following equation (B11). EQU .delta.=G.sub.I -G.sub.I (B 11)
In this case, the error E.sub.I between the target vector and the quantized vector yielded by applying the index I and the quantized gain G.sub.I can be expressed by the following equation (B12) by substituting the preceding equations (B6) through (B8) and (B11) into the preceding equation (B3). ##EQU5##
The right side of the above equation (B12) designates the overall error of the gain quantization when taking the error .delta. of the quantized gain into consideration.
The conventional system selects the index I in order to maximize only the value of A.sub.I.sup.2 /B.sub.I in the second term of the right side of the above equation (B12) without considering the influence of the error .delta. of the quantized gain on the overall error of the quantized vector. As a result, when there is substantial error of the quantized gain, in other words, when the value of the optimal gain GI is apart from the value of the preliminarily prepared gain table, the value of .delta..sup.2 B.sub.I can grow beyond the negligible range in the actual quantization process.
If this occurs, since the overall error of the quantized vector is extremely large, any conventional vector quantization process cannot provide quantization of stable vectors at all.
As just mentioned above, any conventional vector quantization system selects indexes without considering adverse influence of the error of the quantized gain on the overall error of the quantized vector. Consequently, when the error grows itself beyond the negligible range after execution of subsequent quantization of the gain, overall error of the quantized vector significantly grows. As a result, any conventional system cannot provide quantization of stable vectors.
The following description refers to a conventional CELP system mentioned earlier.
FIG. 7 presents the principle structure of a conventional CELP system. In FIG. 7, first, a speech signal is received from an input terminal 1, and then block-segmenting section 2 prepares L units of sample values on a per frame basis, and then these sample values are output from an output port 3 as speech signal vectors having length L. Next, these speech signal vectors are delivered to an LPC analyzer 4. Based on the "auto correlation method", the LPC analyzer 4 analyzes the received speech signal according to the LPC method in order to extract LPC forecast parameter (ai) (i=1, . . . , p). P designates the prediction order. The LPC forecast residual vector is output from an output port 18 for delivery to the ensuing pitch analyzer 21. Using the LPC forecast residual vector, the pitch analyzer 21 analyzes the pitch which is substantially the long-term forecast of speech, and then extracts "pitch period" TP and "gain parameter" b. These LPC forecast parameters, "pitch period" and gain parameter extracted by the pitch analyzer are respectively utilized when generating synthesis speech by applying an LPC synthesis filter 14 and a pitch synthesizing filter 23.
Next, the process for generating speech is described below. The codebook 17 shown in FIG. 7 contains n units of white noise vector of K units of a dimensional number (the number of vector elements), where K is selected so that L/K is an integer. The j-th white noise vector of the codebook 17 is multiplied by the gain parameter 22, and then the product is filtered through the pitch synthesizing filter 23 and the LPC synthesis filter 14. As a result, the synthesis speech vector is output from an output port 24. The transfer function P(Z) of the pitch synthesizing filter 23 and the transfer function A(Z) of the LPC synthesis filter 14 are respectively formulated into the following equations (1) and (2). ##EQU6##
The generated synthesis speech vector is delivered to the square error calculator 19 to gather with the target vector composed of the input speech vector. The square error calculator 19 calculates the Euclidean distance E.sub.j between the synthesis speech vector and the input speech vector. The minimum error detector 20 detects the minimum value of E.sub.j. Identical processes are executed for n units of white noise vectors, and as a result, a number "j" of the white noise vector providing the minimum value is selected. In other words, the CELP system is characterized by quantizing vectors by applying the codebook to the signal driving the synthesis filter in the course of synthesizing speech. Since the input speech vector has length L, the speech synthesizing process is repeated by L/K rounds. The weighting filter 5 shown in FIG. 7 is available for diminishing distortion perceivable by human ears by forming a spectrum of the error signal. The transfer function is formulated into the following equations (3) and (4). ##EQU7##
When the CELP system is actually made available for the encoder itself, those LPC forecast parameters, pitch period, gain parameter of the pitch, codebook number, and the codebook gain, are fully encoded before being delivered to the decoder.
FIG. 8 illustrates the functional block diagram of a conventional CELP system apparatus performing those functional operations identical to those of the apparatus shown in FIG. 7. Compared to the position in the loop available for detecting a conventional codebook, the weighting filter 5 shown in FIG. 8 is installed to an outer position. Based on this structure, P(Z) of the pitch synthesizing filter 23 and A(Z) of the LPC synthesis filter 14 can respectively be expressed to be P(Z/.gamma.) and A(Z/.gamma.). It is thus clear that the weighting filter 5 can diminish the amount of calculation while preserving the identical function.
It is so arranged that the initial memory available for the filtering operation of the pitch synthesizing filter 23 and the LPC synthesis filter 14 does not affect detection of the codebook relative to the generation of synthesis speech. Concretely, another pitch synthesizing filter 25 and another LPC synthesis filter 7 each containing an initial value of memory are provided, which respectively subtract a "zero-input vector" delivered to an output port 8 from a weighted input speech vector preliminarily output from an output port 6 so that the resultant value from the subtraction can be made available for the target vector. As a result, the initial values of memories of the pitch synthesizing filter 23 and the LPC synthesis filter 14 can be reduced to zero. At the same time, it is possible for this system to express generation of synthesis speech, in other words, filter operation of such synthesis filters receiving the codebook in terms of the code vector and the product of the trigonometric matrix shown below. ##EQU8##
A small character "K" shown in the above equation (5) designates a dimensional number (number of elements) of the code vector of the codebook 17. "h(i) i=1, . . . , K" designates impulse response of the length K when the initial value of memory of H(Z/.gamma.) is zero.
Next, the square error calculator 19 calculates error Ej from the following equation (6), and then the minimal distortion detector 20 calculates the minimal value (distortion value). EQU E.sub.j .parallel.X-.gamma..sub.j HC.sub.j .parallel.(J=1, 2, . . . n) (6)
where X designates the target input vector, C.sub.j the j-th code vector, and .gamma..sub.j designates the optimal gain parameter against the j-th code vector, respectively.
FIG. 9 represents a flowchart designating the procedure in which the value E.sub.j is initially calculated and the vector number "j" giving the minimum value of E.sub.j is calculated. To execute this procedure, first, the value of HC.sub.j must be calculated for each "j" by applying multiplication by K(K+1)/2.multidot.n rounds. When K=40 and n=1024 according to conventional practice, as many as 839,680 rounds of multiplication must be executed. Assuming L/K=4 in the total flow of computation, then as many as 1,048,736 rounds per frame of multiplication must be executed. In other words, when using L=160 for the number of samples L per frame and 8 KHz for the sampling frequency of input speech, as many as 52.times.10.sup.6 rounds per second of multiplication must be executed. To satisfy this requirement, at least three digital signal processors each having 20 MIPS of multiplication capacity are needed.
To improve the speech quality of the CELP system, such a system called "formation of closed loop for pitch forecast" or "compatible code book" is conventionally known. Details of this system are described by W. B. Kleijin, D. J. Krasinski, and R. H. Ketchum, in the publication "Improved Speech Quality and Efficient Vector Quatization in CELP", in Proc., ICASSP, 1988, on pages 155 through 158.
Next, referring to FIG. 10, the CELP system called either "formation of closed loop for pitch forecast" or "compatible code book" is briefly explained below.
FIG. 10 is a schematic block diagram designating a principle of the structure. Only the method of analyzing the pitch makes up the difference between the CELP system based on either the above "formation of closed loop for pitch forecast" or the "compatible code book" and the CELP system shown in FIG. 7. When analyzing the pitch according to the CELP system shown in FIG. 7, pitch is analyzed based on the LPC forecast residual signal vector output from the output port 18 of the LPC analyzer. On the other hand, the CELP system shown in FIG. 10 features the formation of a closed loop for analyzing pitch like the case of detecting the code book. When operating the CELP system shown in FIG. 10, the LPC synthesis filter drive signal output from the output 18 of the LPC analyzer goes through a delay unit 13 which is variable throughout the pitch detecting range and generates drive signal vectors corresponding to the pitch period "j". The drive signal vector is assumed to be stored in a compatible codebook 12. Target vector is composed of the weighted input vector free from the influence of the preceding frames. The pitch period is detected in order that the error between the target vector and the synthesis signal vector can be minimized. Simultaneously, an estimating unit 26 applying square-distance distortion computes error Ej as per the equation (7) shown below. EQU E.sub.j .parallel.X-.gamma..sub.j HB.sub.j .parallel.(a.ltoreq.j.ltoreq.b) (7)
where X designates the target vector, Bj the drive signal vector when the pitch period "j" is present, .gamma..sub.j the optimal gain parameter against the pitch period "j", H is given by the preceding equation (5), and "H(i) i=1, . . . , K" designates impulse response of the length K when the initial value of memory of A(Z/.gamma.) is zero, respectively. The symbol "t" shown in FIG. 11 designates the number of sub-frame composed by the input process. When executing this process, the value of HBj must be computed for each "t" and "j". The CELP System shown in FIG. 11 needs to execute multiplication by K(K+1)/2.multidot.(b-a+1).multidot.L/K rounds. Furthermore, when K=40, L=160, a=20, and b=147 in the conventional practice, the CELP system is required to execute multiplication by 461,312 rounds. Accordingly, when using 8 KHz of input-speech sampling frequency, the CELP system needs to execute as many as 23.times.10.sup.6 rounds per second of multiplication. This in turn requires at least two units of DSP (digital signal processor) each having 20 MIPS of multiplication capacity.
As is clear from the above description, when detecting pitch period by applying "detection of code book" and "closed loop or compatible code book" under the conventional CELP system, a huge amount of multiplication is needed, thus raising a critical problem when executing real-time data processing operations with a digital signal processor DSP.